#include<thread>
#include<iostream>
#include<mutex>

void f1(void)
{
	std::cout << "f1" << std::endl;
}

std::once_flag flag;
void f2(void)
{
	std::call_once(flag, f1);
	std::cout << "f2" << std::endl;
}

int main(void)
{
	f2();
	f2();
}
